package com.test.nnooolwdeaer.bean_wooden.user_info_wooden;

import com.test.nnooolwdeaer.util_wooden.StringUtil_wooden;
import com.google.gson.Gson;

import org.json.JSONObject;

public class RepayInfo_wooden {

    private static class Inner_wooden {
        private static RepayInfo_wooden instance = new RepayInfo_wooden();
    }

    private RepayInfo_wooden(){}

    public static RepayInfo_wooden getInstance_wooden(){
        return Inner_wooden.instance;
    }

    private String amount;
    private String interest;
    private String repayDate;
    private String overdueDay;
    private String overdueAmount;
    private String repayAmount;
    private String partRepayFlag;
    private String days;
    private String tenure;
    private String processingFee;
    private String repayProFee;
    private String remainDay;
    private String serviceFee;
    //尼日paystack还款
    private String bankCardNo;
    private String expiryYear;
    private String expiryMonth;
    private String cvv;
    //尼日线下还款
    private String virtualBankAccount;
    private String virtualBankName;

    public static void parse_wooden(JSONObject objJson){
        Inner_wooden.instance = new Gson().fromJson(objJson.toString(), RepayInfo_wooden.class);
    }

    public String getAmount_wooden() {
        return StringUtil_wooden.getSafeString_wooden(amount);
    }

    public String getInterest_wooden() {
        return StringUtil_wooden.getSafeString_wooden(interest);
    }

    public String getRepayDate_wooden() {
        return StringUtil_wooden.getSafeString_wooden(repayDate);
    }

    public String getOverdueDay_wooden() {
        return StringUtil_wooden.getSafeString_wooden(overdueDay);
    }

    public boolean isOverdue_wooden(){
        return StringUtil_wooden.safeParseInt_wooden(overdueDay)>0;
    }

    public String getServiceFee() {
        return StringUtil_wooden.getSafeString_wooden(serviceFee);
    }

    public String getOverdueAmount_wooden() {
        return StringUtil_wooden.getSafeString_wooden(overdueAmount);
    }

    public String getRepayAmount_wooden() {
        return StringUtil_wooden.getSafeString_wooden(repayAmount);
    }

    public String getPartRepayFlag_wooden() {
        return StringUtil_wooden.getSafeString_wooden(partRepayFlag);
    }

    public String getDays_wooden() {
        return StringUtil_wooden.getSafeString_wooden(days);
    }

    public String getTenure_wooden() {
        return StringUtil_wooden.getSafeString_wooden(tenure);
    }

    public String getProcessingFee_wooden() {
        return StringUtil_wooden.getSafeString_wooden(processingFee);
    }

    public String getRepayProFee_wooden() {
        return StringUtil_wooden.getSafeString_wooden(repayProFee);
    }

    public String getRemainDay_wooden() {
        return StringUtil_wooden.getSafeString_wooden(remainDay);
    }

    public String getBankCardNo_wooden() {
        return StringUtil_wooden.getSafeString_wooden(bankCardNo);
    }

    public String getExpiryYear_wooden() {
        return StringUtil_wooden.getSafeString_wooden(expiryYear);
    }

    public String getExpiryMonth_wooden() {
        return StringUtil_wooden.getSafeString_wooden(expiryMonth);
    }

    public String getCvv_wooden() {
        return StringUtil_wooden.getSafeString_wooden(cvv);
    }

    public String getVirtualBankAccount_wooden() {
        return StringUtil_wooden.getSafeString_wooden(virtualBankAccount);
    }

    public String getVirtualBankName_wooden() {
        return StringUtil_wooden.getSafeString_wooden(virtualBankName);
    }
}
